from abc import ABC, abstractmethod
from typing import List, Dict

class TorrentClient(ABC):
    """种子下载器客户端的抽象基类"""
    
    @abstractmethod
    async def connect(self) -> bool:
        """连接到下载器服务器"""
        pass
    
    @abstractmethod
    async def get_torrents(self) -> List[Dict]:
        """获取所有种子信息"""
        pass
    
    @abstractmethod
    async def get_seeding_files(self) -> List[Dict]:  # 修改这里：从 List[str] 改为 List[Dict]
        """获取所有正在做种的文件信息"""
        pass
    
    @abstractmethod
    async def test_connection(self) -> bool:
        """测试连接是否成功"""
        pass
